﻿using Model.Enums.Common;

namespace IService.Base
{
    public interface IRedisService
    {
        #region SysAtrribute

        bool SetRedisAttr<T>(string key, T value, Enum_RedisKey redisKey);

        bool SetRedisAttr<T>(string tenantKey, string key, T value, Enum_RedisKey redisKey);

        bool SetRedisAttr<T>(string key, T value, DateTime expiresAt, Enum_RedisKey redisKey);

        bool SetRedisAttr<T>(string tenantKey, string key, T value, DateTime expiresAt, Enum_RedisKey redisKey);

        bool SetRedisAttr<T>(string key, T value, TimeSpan expiresIn, Enum_RedisKey redisKey);

        bool SetRedisAttr<T>(string tenantKey, string key, T value, TimeSpan expiresIn, Enum_RedisKey redisKey);

        T GetRedisAttr<T>(string key, Enum_RedisKey redisKey);

        T GetRedisAttr<T>(string tenantKey, string key, Enum_RedisKey redisKey);

        bool CheckAdminToken(string token);

        bool CheckAdminToken(string tenantKey, string token);

        bool DeleteRedisAttr(string key, Enum_RedisKey redisKey);

        bool DeleteRedisAttr(string tenantKey, string key, Enum_RedisKey redisKey);

        bool CheckKey(string key, Enum_RedisKey redisKey);

        bool CheckKey(string tenantKey, string key, Enum_RedisKey redisKey);

        void SetTenantKey(string tenantKey);

        #endregion SysAtrribute

        string GetI18nValue(string key);

        string GetI18nValue(string tenantKey, string key);
    }
}